package com.dc.business.datacollectbusiness.controller;

import com.dc.business.datacollectbusiness.model.Result;
import com.dc.business.datacollectbusiness.service.TbengPushCustomDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/api/data")
public class TbengPushCustomDataController {
    @Autowired
    private TbengPushCustomDataService tbengPushCustomDataService;
    @GetMapping("/{tfCollecterProductCode}/{channelno}")
    public Result getBytfCollecterProductCode(@PathVariable String tfCollecterProductCode, @PathVariable String channelno){
        try {
            return Result.success(tbengPushCustomDataService.finaAllDataBytfCollecterProductCode(tfCollecterProductCode, channelno));
        }catch (Exception e){
            return Result.error(e.getMessage());
        }
    };
}
